//
//  SwiftTestVC.swift
//  YXKitOC
//
//  Created by zhxin on 2020/8/18.
//  Copyright © 2020 张鑫. All rights reserved.
//

import UIKit

@objc class SwiftTestVC: YXBaseVC {

    override func viewDidLoad() {
        super.viewDidLoad()

        var array = Array<UIView>()
        
        for _ in 0...3 {
            let view = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 40))
            view.backgroundColor = YX_RandomColor()
            array.append(view)
        }
        
        let paddings = [NSNumber.init(value: 100), NSNumber.init(value: 10), NSNumber.init(value: 32)]
        
        self.view.yx_sortSubviews(byFrame: array, paddings: paddings) { (config) in
            config.alignment = .left
            config.leading = 10
        }
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
